<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>生成方案管理</title>
	<script type="text/javascript">
		$(document).ready(function() {
			layui.use('table', function(){
				let table = layui.table;
				table.init('layui-filter-table1',{
					escape : false
					,height: getLayuiTableHeight()
					,className: 'layui-table-custom'
					,done: function (res,curr,count){
					}
				});
			});
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
<ul class="nav nav-tabs nav-tabs-bottom mb-0">
	<li class="nav-item"><a href="#" class="nav-link active">生成方案列表</a></li>
	<li class="nav-item"><a href="${ctxAdmin}/gen/genScheme/form" class="nav-link">生成方案添加</a></li>
</ul>
<div class="content">
	<sys:message content="${message}"/>
	<div class="card">
		<form:form id="searchForm" class="form-inline"
				   modelAttribute="genScheme" method="post"
				   action="${ctxAdmin}/gen/genScheme">
			<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
			<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
			<div class="input-group input-group-sm">
				<div class="input-group-prepend">
					<span class="input-group-text">描述</span>
				</div>
				<form:input path="name" htmlEscape="false" maxlength="100" class="form-control"/>
			</div>
			<div class="btn-group btn-group-sm">
				<button id="btnSubmit" type="submit" class="btn btn-primary " onclick="return page();">查询</button>
				<button id="btnReset" type="button" class="btn btn-success" onclick="resetForm();page();">重置</button>
			</div>
		</form:form>
		<table id="layui-table-id1" lay-filter="layui-filter-table1" style="display: none;">
			<thead>
			<tr>
				<th lay-data="{field:'checkbox',type: 'checkbox', fixed: 'left'}"></th>
				<th lay-data="{field:'id',hide:true}">ID</th>
				<th lay-data="{field:'a.type',width:200}">方案名称</th>
				<th lay-data="{field:'a.number',width:250}">生成模块</th>
				<th lay-data="{field:'a.name',width:150}">模块名</th>
				<th lay-data="{field:'a.office_id',width:200}">功能名</th>
				<th lay-data="{field:'a.node_status',width:120,align:'center'}">功能作者</th>
				<shiro:hasPermission name="gen:genScheme:edit">
					<th lay-data="{field:'opt',align:'center',width: 120}">操作</th>
				</shiro:hasPermission>
			</tr>
			</thead>
			<tbody>
			<c:forEach items="${page.list}" var="genScheme">
				<tr>
					<td></td>
					<td></td>
					<td><a href="${ctxAdmin}/gen/genScheme/form?id=${genScheme.id}">${genScheme.name}</a></td>
					<td>${genScheme.packageName}</td>
					<td>${genScheme.moduleName}${not empty genScheme.subModuleName?'.':''}${genScheme.subModuleName}</td>
					<td>${genScheme.functionName}</td>
					<td>${genScheme.functionAuthor}</td>
					<shiro:hasPermission name="gen:genScheme:edit"><td>
						<a href="${ctxAdmin}/gen/genScheme/form?id=${genScheme.id}">修改</a>
						<a href="${ctxAdmin}/gen/genScheme/delete?id=${genScheme.id}" onclick="return confirmx('确认要删除该生成方案吗？', this.href)">删除</a>
					</td></shiro:hasPermission>
				</tr>
			</c:forEach>
			</tbody>
		</table>
		<sys:laypage page="${page}"/>
	</div>
</div>


</body>
</html>
